﻿<%@ Register TagPrefix="cnt" Namespace="Mysoft.Map.Application.Controls" Assembly="Mysoft.Map.Application.Components" %>
<%@ Register TagPrefix="mnu" Namespace="Mysoft.Map.Application.Menus" Assembly="Mysoft.Map.Application.Components" %>
<%@ Page Language="vb" AutoEventWireup="false" Codebehind="WF_ProcessInitiate_Form_lr.aspx.vb" Inherits="MyWorkflow.WF_ProcessInitiate_Form_lr" enableviewstate="false" %>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML>
	<HEAD>
		<title></title>
		<meta name="GENERATOR" content="Microsoft Visual Studio .NET 7.1">
		<meta name="CODE_LANGUAGE" content="Visual Basic .NET 7.1">
		<meta name="vs_defaultClientScript" content="JavaScript">
		<meta name="vs_targetSchema" content="http://schemas.microsoft.com/intellisense/ie5">
		<link rel="stylesheet" type="text/css" href="/_nav/menu.css">
		<link rel="stylesheet" type="text/css" href="/_common/styles/global.css">
		<link rel="stylesheet" type="text/css" href="/_grid/map_grid.css">
		<link rel="stylesheet" type="text/css" href="/_forms/styles/form.css">
		<link rel="stylesheet" type="text/css" href="/_nav/tabs.css">
		<link rel="stylesheet" type="text/css" href="/_nav/nav.css">
		<link rel="stylesheet" type="text/css" href="/_common/styles/select.css">
		<link rel="stylesheet" type="text/css" href="/MyWorkflow/css/AttachMent_menu.css">
		<script language="javascript" src="/_common/scripts/global.js"></script>
		<script language="javascript" src="/_common/scripts/Details.js"></script>
		<script language="javascript" src="/_controls/settings.aspx"></script>
		<script language="javascript" src="/_controls/util/util.js"></script>
		<script language="javascript" src="/_controls/datetime/date.js"></script>
		<script language="javascript" src="/_controls/datetime/time.js"></script>
		<script language="javascript" src="/_controls/number/number.js"></script>
		<script language="javascript" src="/_controls/lookup/map_lookup.js"></script> 
		<script language="javascript" src="/_nav/menu.js"></script>
		<script language="javascript" src="/_forms/FormBase.js"></script>
		<script language="javascript" src="Workflow.js"></script>
		<script language="javascript" src="WF_CreateObject.js"></script>
		<script language="javascript" src="WF_ProcessInitiate_Form.js"></script>
		<script language="javascript" src="/PubProject/js/PubProject_WF.js"></script>
		<script language="javascript" src="/_controls/upfile/UpFile.js"></script>
		<script language="javascript" src="WF_AttachMent_menu.js"></script>
		<style>
			span.tabOn{	filter: "";background-color: white;border-bottom: 1px solid white;padding-bottom: 5px;cursor: default;}
			div.left{float:left;clear:right;width:74%;height:100%} 
			div.center{float:left;clear:none;height:100%;}
			div.right{float:right;clear:left;width:25%;height:100%;}
			div.bottom{height: 100%;width:100%;}
			table{width:100%;}
			iframe{OVERFLOW: auto; WIDTH: 100%; HEIGHT: 100%}
			.isshow {font-size: 12px;border: 1px solid #94a6b5;top: 1px;left: 1px;
	            height: 17px;margin-right: 1px;position: relative;padding: 5px;padding-top: 2px;
	            padding-bottom: 3px;background-color: #ffffff;cursor: hand;}
	         a { text-decoration:none;}
		</style>
		<SCRIPT LANGUAGE=javascript FOR=oframe EVENT=NotifyCtrlReady>
			loadDoc();
		</SCRIPT>
		<script language="javascript">
			//在线帮助文件
			var _MyHelpfile = "/MyWorkflow/help/流程管理/新建流程/发起流程.htm";
			
			function setInterface(){
			    sDocType = $id("txtDocumentType").value;
	            sMode = $id("txtMode").value;
        
                if(sDocType == "0" || sDocType == "2"){
                    $id("Span4").style.display = "none";
                }
                var bodyHeight;
                if(document.body.offsetHeight - $id("divMenu").offsetHeight < 0){
                    bodyHeight = window.screen.availHeight - 150;
                }else{
                    bodyHeight = document.body.offsetHeight;
                }
                $id("tab0_div").style.height = bodyHeight - $id("divMenu").offsetHeight;
                //RefleshFormWidth();
			}
			
			//控制文档/表单编辑区宽度
            function changeDivForm(){
                if($id("txtDocumentType").value == "1" || $id("txtDocumentType").value == "3"){
                    //$id("oframe").style.width = "100%";
                }else{
                    dyniframesize("appIframe_HtmlForm");
                }
            }

            //只有左右结构的流程才会用到此函数.
            function RefleshFormWidth() {
                dyniframe = $id("appIframe_HtmlForm");
                dyniframe = dyniframe == null ? $id("tab_0") : dyniframe;
                //减6防止出现滚动条 chenxy 090506 注
                var width = $id("tab_0").offsetWidth - 6;
                if (width < 0) width = "0px";
                else width = width + "px";

                if (dyniframe.contentDocument && dyniframe.contentDocument.body && dyniframe.contentDocument.body.offsetWidth)
                    dyniframe.width = width;
                else if (dyniframe.Document && dyniframe.Document.body && dyniframe.Document.body.scrollWidth)
                    dyniframe.style.width = width;

//                if (document.getElementById("oframe")) {

//                    document.getElementById("oframe").style.width = width; 
//                    alert(document.getElementById("oframe").style.width)
//                }
            }

            //重绘oframe控件大小
            function ResetOframeSize() {
                if (document.getElementById("oframe")) {
                    var width = $id("tab_0").offsetWidth - 6;
                    if (width < 0) width = "0px";
                    else width = width + "px";

                    $id("tab_0")
                    if(document.getElementById("tab_0").style.width == "100%")
                    {
                        document.getElementById("tab_0").style.width = "99%";    
                    }
                    else
                    {
                        document.getElementById("tab_0").style.width = "100%";    
                    }
                }
            }

            //加载第一个标签页
            function LoadFirtTab() {
                if($id("tab_0").style.display != "none") return; 
                loadTab('0');
                ResetOframeSize();
                setTimeout(ResetOframeSize, 1); 
            }
            
		</script>
	</HEAD>
	<body MS_POSITIONING="GridLayout" onload="window_onload();" onbeforeunload="oprBeforeClose();">
		<div id="divMenu" style="height:48px">
			<mnu:AppFormMenu id="appFormMenu" runat="server"></mnu:AppFormMenu>
		</div>
		<div id="tab0_div" style="DISPLAY: inline;padding:5px;width:100%;height:100%">
			<div id="tdDoc" class="left" onresize="RefleshFormWidth()">
				<table height="100%" cellspacing="0" cellpadding="0" width="100%">
                    <tr>
                        <td>
                            <table height="100%" cellSpacing="0" cellPadding="0" width="100%">
					        <tr id="tr1" height="25">
						        <td>
                                    <table cellspacing="0" cellpadding="0" class="tabBar" mode="noGlow">
                                        <tr>
                                            <td id="Td1" nowrap valign="bottom">
                                                <span id="Span1" tabID="tab_0" tabindex="0" class="tab tabOn" onclick="LoadFirtTab()">
                                                    业务信息 </span><span id="Span4" tabID="tab_3" tabindex="0" class="tab" onclick="loadTab('3')">
                                                    附件及意见 </span><span id="Span2" tabID="tab_1" tabindex="1" class="tab" onclick="loadTab('1')">
                                                        审批流程 </span><span id="Span3" tabID="tab_2" tabindex="2" class="tab" onclick="loadTab('2')">
                                                            历史表单 </span>
                                            </td>
                                            <td></td>
                                        </tr>
                                    </table>
                                    <hr id="Hr1" class="tabGlow">
					                <hr id="Hr2" class="tabGlow">
                                 </td>
                              </tr>
                              <tr valign="top">
                                <td>
                                    <div id="tab_0" class="tab" style="DISPLAY:inline;OVERFLOW:auto;SCROLLBAR-FACE-COLOR:#d4ddef;SCROLLBAR-HIGHLIGHT-COLOR:#d4ddef;SCROLLBAR-SHADOW-COLOR:#d4ddef;	SCROLLBAR-3DLIGHT-COLOR:#d4ddef;SCROLLBAR-ARROW-COLOR:#3f6dad;SCROLLBAR-TRACK-COLOR:#f1f3f9;SCROLLBAR-DARKSHADOW-COLOR:#d4ddef;SCROLLBAR-BASE-COLOR:#000000;background-color:White;position:absolute;padding:2px;width:100%" >
                                            <table id="divForm" cellspacing="0" cellpadding="0" border="0">
                                                <tr>
                                                    <td valign="top">
                                                    <iframe scrolling="no" style="width: 100%;" id="appIframe_HtmlForm" name="appIframe_HtmlForm" src="blank.htm" frameborder="0"></iframe>
                                                    </td>
                                                </tr>
                                                <tr valign="top" height="1px">
                                                    <td><div id="divAttachMent" style="width: 100%;"></div><div id="divReplyBiz" style="width: 100%;"></div></td>
                                                </tr>
                                            </table>
                                    </div>
                                    <div id="tab_1" class="tab" style="padding:2px;">
                                        <table height="100%" cellspacing="0" cellpadding="0" width="100%" border="0">
                                            <tr>
                                                <td valign="top">
                                                    <iframe style="width: 100%; height: 100%" scrolling="no" id="tab1_div_if" src=""
                                                        frameborder="0"></iframe>
                                                </td>
                                            </tr>
                                        </table>
                                    </div>
                                    <div id="tab_2" class="tab" style="padding:2px;">
                                        <table height="100%" cellspacing="0" cellpadding="0" width="100%" border="0">
                                            <tr>
                                                <td valign="top">
                                                    <iframe style="width: 100%; height: 100%" scrolling="auto" id="tab2_div_if" src=""
                                                        frameborder="0"></iframe>
                                                </td>
                                            </tr>
                                        </table>
                                    </div>
                                    <div id="tab_3" class="tab" style="padding:2px;width:100%;height:100%;overflow-y:auto;SCROLLBAR-FACE-COLOR:#d4ddef;SCROLLBAR-HIGHLIGHT-COLOR:#d4ddef;SCROLLBAR-SHADOW-COLOR:#d4ddef;SCROLLBAR-3DLIGHT-COLOR:#d4ddef;SCROLLBAR-ARROW-COLOR:#3f6dad;SCROLLBAR-TRACK-COLOR:#f1f3f9;SCROLLBAR-DARKSHADOW-COLOR:#d4ddef;SCROLLBAR-BASE-COLOR:#000000;">
                                        <table height="100%" cellspacing="0" cellpadding="0" width="100%" border="0">
                                            <tr valign="top" height="1px">
                                                <td valign="top"><div id="_divAttachMent" style="width: 100%;"></div><div id="divReplyOffice" style="width: 100%;"></div></td>
                                            </tr>
                                        </table>
                                    </div>
                                    <!--提示框开始-->
	                                <div id="divMsg" style="position:absolute;z-index:999;display:none;line-height:25px;background:url(images/bground.gif);padding:3px 8px 3px 8px;">
                                        <div style="text-align:left;width:100%;font-weight:bold;color:#15428b;">&nbsp;系统提示！</div>
                                        <div style="width:100%">
	                                        <table style="table-layout:fixed;height:100%;font-size:9pt;width:100%">
	                                            <tr>
	                                                <td style="width:55px;" valign="middle" align="center"><img src="images/icon-question.gif" /></td>
	                                                <td valign="middle">
	                                                    <div style="height:60px;padding-top:16px;">&nbsp;&nbsp;&nbsp;&nbsp;业务数据发生变化，表单已自动同步，请确认是否要发起？</div>
	                                                    <div style="text-align:center;">&nbsp;&nbsp;&nbsp;<button onclick="doOK()">确 定</button>&nbsp;<button onclick="doCancel()">取 消</button></div>
	                                                </td>
                                                </tr>                    
	                                        </table>
                                        </div>
                                    </div>
                                    <!--提示框结束-->
                                   </td>
                                 </tr>
                             </table>
                        </td>
                    </tr>
                </table>
			</div>
			<div id="tdSplit" class="center">
				<img id="imgSwitch" src="/_nav/imgs/nav0_hide_arrow_out.gif" style="CURSOR:hand;position: absolute;top:expression((this.parentElement.offsetHeight-this.offsetHeight)/2);" onclick="displayReply();">
			</div>	
			<div id="divProperty" class="right"> 
				<table height="100%" cellSpacing="0" cellPadding="0" width="100%">
					<tr height="25">
						<td>
							<table class="tabBar" cellSpacing="0" cellPadding="0" mode="noGlow">
								<tr>
									<td id="tabs" vAlign="bottom" noWrap>
										<span class="tab" id="tab0" onclick="" tabIndex="0" tabID="tab_property">流程属性</span>
									</td>
								</tr>
							</table>
							<hr class="tabGlow" id="appForm_hrSelectedTab">
							<hr class="tabGlow" id="appForm_hrGlowTab">
						</td>
					</tr>
					<tr>
						<td id="tab_iframes" valign="top">
							<div class="tab" id="tab_property" style="background-color:white;PADDING-RIGHT: 3px; DISPLAY: inline; PADDING-LEFT: 3px; BORDER-LEFT-COLOR: #889dc2; BORDER-BOTTOM-COLOR: #889dc2; PADDING-BOTTOM: 3px; OVERFLOW: auto; BORDER-TOP-COLOR: #889dc2; PADDING-TOP: 3px; BORDER-RIGHT-COLOR: #889dc2">
								<table id="tblProperty" width="100%" height="100%" cellpadding="0"
									cellspacing="0">
									<tr height="180px">
										<td>
											<cnt:AppForm id="appForm" runat="server" onbeforesave="oprBeforeSave()" onaftersave="oprAfterSave()" processtype="xmlhttp"></cnt:AppForm>
										</td>
									</tr>
									<tr>
									    <td valign="top">
									         <table id="divStation" style="BORDER: #889dc2 1px solid;WIDTH:100%;HEIGHT:100%;" cellspacing="0" cellpadding="0" border="0">
									        <colgroup>
									            <col width="60px;" />
									            <col />
									        </colgroup>
				                            <tr height="1px" style="height:10px">
					                            <td colspan ="2"><table border="0" cellspacing="0" style="height:100%;width: 100%;background-color: #7288AC;border: #abc0e7 1px solid;border-right: #00377a 1px solid;border-bottom: #00377a 1px solid;">
										                <tr><td></td></tr>
										            </table></td>
				                            </tr>
					                        <tr height="30px">
					                                <%--BUG 45476 岗位和处理意见没有对齐 sunfx 2009年5月6日17:16:03 END--%>
						                            <td class="req" style="padding-left:3px" align="left"> 岗 位</td>
						                            <td align="left">
						                                <span id="Station" onblur="setValueToStation(this)" class="selectBox" typename="mapType" req="1" readOnly ro="0" value="">
														    <table id="_StationGUID_Table" cellspacing="0" cellpadding="2" style="display: none;">
															    <tr height="18">
																    <td nowrap val="">
																    </td>
															    </tr>
														    </table>
													    </span>										   
													</td>
					                          </tr>
		                                        <tr height="20px">
		                                            <td class="req" style="padding-left:3px" align="left">发起说明</td><td></td>
		                                        </tr>
					                          <tr height="200px">
						                            <td valign="top" align="center" colspan="2">
						                            <textarea id="txtHandleText" style="HEIGHT: 98%;word-break:break-all;" maxlength="1000"></textarea>
						                            </td>
					                          </tr>
                                                <tr height="10px">
		                                            <td></td><td></td>
		                                        </tr>
					                          <tr>
					                            <td valign="top"align="center" colspan="2">
					                                <a id="cInit" href="#" style="display:none;" onclick="cInit_click()"><img src="images/init.gif" onmousemove="this.src='images/init1.gif'" onmouseout="this.src='images/init.gif'" border="0" /></a>
					                            </td>
					                          </tr>
				                        </table>
									    </td>
									</tr>
								</table>
							</div>
						</td>
					</tr>
				</table>	 
			</div>
		</div>
		<div id="tab1_div" style="DISPLAY: none;padding:10px;width:100%;height:100%;">
			<div style="BORDER: #889dc2 1px solid;width:100%;height:100%;">
				<iframe id="ifrStepList" name="ifrStepList" src="" width="100%" height="100%"></iframe>
			</div>
		</div>	
		<!-- 这里用来定义需要显示的审批附件右键菜单 -->
        <div id='menu' class='skin1'>
            <div class='menuitems' action='select'>查看</div>
            <div class='menuitems' action='checkOut'>签出</div>
            <div class='menuitems' action='edit'>编辑</div>
            <div class='menuitems' action='checkIn'>签入</div>
            <div class='menuitems' action='rename'>重命名</div>
            <div class='menuitems' action='del'>删除</div>
            <div class='menuitems' action='attribute'><span style='float: left'>属性 </span><span style='float: right; vertical-align: middle;'><img id='imgA' src='images/nav0_arrow_right.gif' /></div>
        </div>
        <div id="divAttribute" style="display:none;position: absolute;width:180px;height:75px">
            <table border="0" bgcolor="#FFFFFF" style="font-size: 12px;border: 1 solid black;" cellspacing="0">
                <tr>
                    <td>修改人：</td>
                    <td></td>
                </tr>
                <tr>
                    <td nowrap>修改时间：</td>
                    <td></td>
                </tr>
                <tr>
                    <td>创建人：</td>
                    <td></td>
                </tr>
                <tr>
                    <td>创建时间：</td>
                    <td></td>
                </tr>
            </table>
        </div>
    <!-- 右键菜单结束-->
		<form id="Form1" runat="server" >
			<input id="txtMode" value='<% =Request.QueryString("mode") %>' style="DISPLAY:none">
			<input id="txtProcessGUID" value='<% =Request.QueryString("processguid") %>' style="DISPLAY:none">
			<input id="txtOId" value='<% =Request.QueryString("oid") %>' style="DISPLAY:none">
			<input id="txtBusinessGUID" type="text" runat="server" style="DISPLAY:none">
			<input id="txtOriginalHTML" type="hidden" style="DISPLAY:none">
			<asp:textbox id="ExtendFormUrl" style="DISPLAY:none" runat="server"></asp:textbox>
			<asp:textbox id="txtDocumentDiscuss" runat="server" style="DISPLAY:none"></asp:textbox>
			<asp:textbox id="txtDocumentType" style="DISPLAY:none" runat="server"></asp:textbox>
			<asp:textbox id="txtDocumentGUID" style="DISPLAY:none" runat="server"></asp:textbox>
			<asp:textbox id="txtBusinessTypeGUID" style="DISPLAY: none" runat="server"></asp:textbox>
			<asp:textbox id="txtStepGUID" style="DISPLAY: none" runat="server"></asp:textbox>
			<asp:textbox id="txtCanDocModify" style="DISPLAY: none" runat="server"></asp:textbox>
			<asp:textbox id="txtCanDocNumber" style="DISPLAY: none" runat="server"></asp:textbox>
			<asp:textbox id="txtCanUserModify" style="DISPLAY: none" runat="server"></asp:textbox>
			<asp:textbox id="txtDomainXML" style="DISPLAY:none" runat="server" TextMode="MultiLine"></asp:textbox>
			<asp:textbox id="txtDispBusinessDomain" style="DISPLAY:none" runat="server"></asp:textbox>
			<asp:textbox id="txtEditBusinessDomain" style="DISPLAY:none" runat="server"></asp:textbox>
			<asp:textbox id="txtCanChildBU" style="DISPLAY:none" runat="server"></asp:textbox>
			<asp:textbox id="txtInterfaceStyle" style="DISPLAY:none" runat="server"></asp:textbox>
			<asp:textbox id="txtNameCodingRule" style="DISPLAY:none" runat="server"></asp:textbox>
			<asp:textbox id="txtCodeCodingRule" style="DISPLAY:none" runat="server"></asp:textbox>
			<asp:textbox id="txtIdeapBusinessDomain" style="DISPLAY:none" runat="server"></asp:textbox>
			<asp:textbox id="txtProcessCompareDomain" style="DISPLAY:none" runat="server"></asp:textbox>
			
			<asp:textbox id="txtNum" style="DISPLAY:none" runat="server"></asp:textbox> 
			<asp:textbox id="txtMonth" style="DISPLAY:none" runat="server"></asp:textbox>
			<asp:textbox id="txtYear" style="DISPLAY:none" runat="server"></asp:textbox>
			<input id="txtBUCode" type="text" runat ="server" style="DISPLAY:none">
			<input id="txtBUName" type="text" value='<% =Session("BUName") %>' style="DISPLAY:none"/>
			<input type="hidden" id="txtStepSpStatus" runat ="server" />
			
		</form>
	</body>
	<script language="javascript">
	    //去掉“流程属性”appForm的边框和边距
	    $id("appForm_tab0").style.padding = "0px"; 
    	$id("appForm_tab0").style.border = "0px";
    	$id("appForm_tab0").style.backgroundColor = "white";
    	$id("tblProperty").style.display = "inline";
	    setInterface();
	</script>

</HTML>